
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: class Resource</title>
</head><body bgcolor="#f0f0f8">
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Resource">class <strong>Resource</strong></a>(<a href="__builtin__.html#object">__builtin__.object</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt>A&nbsp;class&nbsp;for&nbsp;interacting&nbsp;with&nbsp;a&nbsp;resource.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%">Methods defined here:<br>
<dl><dt><a name="Resource-__init__"><strong>__init__</strong></a>(self)</dt></dl>

<dl><dt><a name="Resource-image"><strong>image</strong></a> = method(self, **kwargs)</dt><dd><tt>Returns&nbsp;the&nbsp;scaled/cropped&nbsp;image&nbsp;attached&nbsp;to&nbsp;a&nbsp;freebase&nbsp;node.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;maxwidth:&nbsp;integer,&nbsp;Maximum&nbsp;width&nbsp;in&nbsp;pixels&nbsp;for&nbsp;resulting&nbsp;image.<br>
&nbsp;&nbsp;maxheight:&nbsp;integer,&nbsp;Maximum&nbsp;height&nbsp;in&nbsp;pixels&nbsp;for&nbsp;resulting&nbsp;image.<br>
&nbsp;&nbsp;fallbackid:&nbsp;string,&nbsp;Use&nbsp;the&nbsp;image&nbsp;associated&nbsp;with&nbsp;this&nbsp;secondary&nbsp;id&nbsp;if&nbsp;no&nbsp;image&nbsp;is&nbsp;associated&nbsp;with&nbsp;the&nbsp;primary&nbsp;id.<br>
&nbsp;&nbsp;pad:&nbsp;boolean,&nbsp;A&nbsp;boolean&nbsp;specifying&nbsp;whether&nbsp;the&nbsp;resulting&nbsp;image&nbsp;should&nbsp;be&nbsp;padded&nbsp;up&nbsp;to&nbsp;the&nbsp;requested&nbsp;dimensions.<br>
&nbsp;&nbsp;mode:&nbsp;string,&nbsp;Method&nbsp;used&nbsp;to&nbsp;scale&nbsp;or&nbsp;crop&nbsp;image.<br>
&nbsp;&nbsp;&nbsp;&nbsp;Allowed&nbsp;values<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fill&nbsp;-&nbsp;TODO(bendrees)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fillcrop&nbsp;-&nbsp;TODO(bendrees)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fillcropmid&nbsp;-&nbsp;TODO(bendrees)<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;fit&nbsp;-&nbsp;TODO(bendrees)<br>
&nbsp;&nbsp;id:&nbsp;string,&nbsp;Freebase&nbsp;entity&nbsp;or&nbsp;content&nbsp;id,&nbsp;mid,&nbsp;or&nbsp;guid.&nbsp;(required)&nbsp;(repeated)</tt></dd></dl>

<dl><dt><a name="Resource-mqlread"><strong>mqlread</strong></a> = method(self, **kwargs)</dt><dd><tt>Performs&nbsp;MQL&nbsp;Queries.<br>
&nbsp;<br>
Args:<br>
&nbsp;&nbsp;lang:&nbsp;string,&nbsp;The&nbsp;language&nbsp;of&nbsp;the&nbsp;results&nbsp;-&nbsp;an&nbsp;id&nbsp;of&nbsp;a&nbsp;/type/lang&nbsp;object.<br>
&nbsp;&nbsp;cursor:&nbsp;string,&nbsp;The&nbsp;mql&nbsp;cursor.<br>
&nbsp;&nbsp;indent:&nbsp;integer,&nbsp;How&nbsp;many&nbsp;spaces&nbsp;to&nbsp;indent&nbsp;the&nbsp;json.<br>
&nbsp;&nbsp;callback:&nbsp;string,&nbsp;JS&nbsp;method&nbsp;name&nbsp;for&nbsp;JSONP&nbsp;callbacks.<br>
&nbsp;&nbsp;uniqueness_failure:&nbsp;string,&nbsp;How&nbsp;MQL&nbsp;responds&nbsp;to&nbsp;uniqueness&nbsp;failures.<br>
&nbsp;&nbsp;&nbsp;&nbsp;Allowed&nbsp;values<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hard&nbsp;-&nbsp;Be&nbsp;strict&nbsp;-&nbsp;throw&nbsp;an&nbsp;error.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;soft&nbsp;-&nbsp;Just&nbsp;return&nbsp;the&nbsp;first&nbsp;encountered&nbsp;object.<br>
&nbsp;&nbsp;dateline:&nbsp;string,&nbsp;The&nbsp;dateline&nbsp;that&nbsp;you&nbsp;get&nbsp;in&nbsp;a&nbsp;mqlwrite&nbsp;response&nbsp;to&nbsp;ensure&nbsp;consistent&nbsp;results.<br>
&nbsp;&nbsp;html_escape:&nbsp;boolean,&nbsp;Whether&nbsp;or&nbsp;not&nbsp;to&nbsp;escape&nbsp;entities.<br>
&nbsp;&nbsp;cost:&nbsp;boolean,&nbsp;Show&nbsp;the&nbsp;costs&nbsp;or&nbsp;not.<br>
&nbsp;&nbsp;query:&nbsp;string,&nbsp;An&nbsp;envelope&nbsp;containing&nbsp;a&nbsp;single&nbsp;MQL&nbsp;query.&nbsp;(required)<br>
&nbsp;&nbsp;as_of_time:&nbsp;string,&nbsp;Run&nbsp;the&nbsp;query&nbsp;as&nbsp;it&nbsp;would've&nbsp;been&nbsp;run&nbsp;at&nbsp;the&nbsp;specified&nbsp;point&nbsp;in&nbsp;time.</tt></dd></dl>

<dl><dt><a name="Resource-text"><strong><a href="freebase.v1.text.html">text</a></strong></a> = methodResource(self)</dt><dd><tt>A&nbsp;collection&nbsp;resource.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
</td></tr></table>
</body></html>